package com.sufen.seckill.vo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.ToString;

import java.io.InputStream;

@Getter
@AllArgsConstructor
@ToString
public enum RespBeanEnum {
    //通用
    SUCCESS(200,"成功"),
    ERROR(500,"服务端异常"),
    //登录
    LOGIN_NULL_ERROR(500208,"用户名或密码为空"),
    LOGIN_ERROR_NULLUSER(500209,"数据库中无此用户"),
    LOGIN_ERROR(500210,"用户名或密码错误"),
    MOBILE_ERROR(500211,"手机号码格式不正确"),
    BIND_ERROR(500212,"参数校验异常"),
    Cookie_NULL_ERROR(500213,"未登录，拿不到Cookie，无法通过Cookie从redis里取到user"),
    User_NULL_ERROR(500214,"有Cookie，但是redis里面没有对应的User。。可能被管理员删了，或者你瞎传了一个Cookie进来"),
    PASSWORD_UPDATE_ERROR(500215,"密码更新失败"),
    //秒杀模块5005xx
    EMPTY_STOCK(500500,"空库存"),
    REPEATE_ERROR(500501,"禁止重复抢购，该商品每人限购一件"),
    REQUEST_ILLEGAL(500502,"请求非法，请重新尝试"),
    ERROR_CAPTCHA(500503,"验证码错误，请重新输入"),
    //订单模块5003xx
    ORDER_NOT_EXIST(500300,"订单信息不存在");
    private final Integer code;
    private final String message;

}
